﻿<%--

This file is part of Refix.

Refix is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

Refix is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with Refix.  If not, see <http://www.gnu.org/licenses/>.

Copyright (C) 2010-11 David Musgrove and others.
 
--%><%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BrowseEntry>>" %>
<%@ Import Namespace="Refix.Repository.ViewModels" %>
<%@ Import Namespace="System.Collections.Generic" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Refix Repository
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Refix Repository</h2>
    <%
        if (!string.IsNullOrEmpty(Refix.Core.Configuration.RemoteRepository))
        {
        %><p>Next level repository: <a href="<%= Refix.Core.Configuration.RemoteRepository %>"><%= Refix.Core.Configuration.RemoteRepository%></a></p><%
        }
        else
        {
        %><p>This is a top level repository.</p><%
        }
    %>
    <div id="browse">
    <%

        foreach (var entry in Model)
        {
            if (entry.CanUpload)
            {
                %><a href="<%= entry.UploadUrl %>" class="upload" title="Upload to next level repository"> </a><%
            }
            else
            {
                %><span href="x" class="upload"> </span><%
            }
            %><a href="<%= entry.Url %>" class="<%= entry.Icon %>"><%= entry.Label %></a><br /><%
        }
    %></div>
    
</asp:Content>
